<template>
	<view class="content">
		<view class="ItemTitle">
			<view class="Title">查询项目: {{OBJ.reportType == 1 ? '车辆历史报告-事故版' : '车辆历史报告-维保版'}}</view>
			<view class="frequencyNum" :style="{color: OBJ.type == 1 ?'#FF0000':'#00A3E6' }">次数{{OBJ.type == 1 ? '-':'+' }}{{OBJ.count}}</view>
		</view>
		<view class="Item">
			<view class="key">购买时间</view>
			<view class="value">{{OBJ.createTime}}</view>
		</view>
		<view class="Item">
			<view class="key">订单编号</view>
			<view class="value">{{OBJ.orderSn}}</view>
		</view>
		<view class="Item" v-if="OBJ.type == 1">
			<view class="key">支付方式</view>
			<view class="value" style="color: #00a3e6;">剩余次数</view>
		</view>
		<view class="Item" style="margin-bottom: 0;padding-bottom: 40rpx;border-bottom: 1rpx solid #efefef;">
			<view class="key">剩余次数</view>
			<view class="value">{{OBJ.count}}</view>
		</view>
		<view class="ItemBottom">
			<view class="left">
				<view class="leftName">支付金额</view>
				<view class="leftPrice">￥{{OBJ.amount}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"frequencyItem",
		props:{
			OBJ:{
				type:Object,
				default:()=>{
					return {}
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			topage(){
				uni.navigateTo({
					url:'/pages/index/index'
				})
			},
			checkItem(){
				uni.navigateTo({
					url:`/pages/AccidentReport/AccidentReport?orderId=${this.OBJ.id}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		padding: 30rpx;
		margin-bottom: 30rpx;
		border-radius: 16rpx;
		background-color: #fff;
		box-shadow: 0rpx 8rpx 24rpx 0rpx rgba(9,30,66,0.1);
		.ItemTitle{
			display: flex;
			align-items: center;
			padding: 10rpx 6rpx 48rpx;
			justify-content: space-between;
			.Title{
				font-weight: 400;
				font-size: 30rpx;
				color: #000000;
			}
			.frequencyNum{
				font-weight: 400;
				font-size: 24rpx;
				color: #00A3E6;
			}
			
		}
		.Item{
			display: flex;
			align-items: center;
			margin-bottom: 20rpx;
			.key{
				width: 130rpx;
				color: #666666;
				font-weight: 400;
				font-size: 26rpx;
				margin-right: 40rpx;
			}
			.value{
				font-weight: 400;
				font-size: 26rpx;
				color: #666666;
			}
		}
		.ItemBottom{
			display: flex;
			padding-top: 30rpx;
			align-items: center;
			justify-content: flex-end;
			.left{
				display: flex;
				align-items: center;
				.leftName{
					font-weight: 400;
					font-size: 28rpx;
					color: #333333;
					margin-right: 8rpx;
				}
				.leftPrice{
					font-weight: 400;
					font-size: 28rpx;
					color: #FF0000;
				}
			}
			.right{
				display: flex;
				align-items: center;
				font-weight: 400;
				font-size: 28rpx;
				color: #999999;
			}
		}
	}
</style>